package thinkingJava.chapter15;

class Base {}
class Derived extends Base {}
interface OrdinaryGetter {
	Base get();
}
interface DerivedGetter extends OrdinaryGetter {
	Derived get();
}
public class CovariantReturnTypes {

	static void test(DerivedGetter d) {
		Derived d2 = d.get();
	}
	static void test2(OrdinaryGetter og) {
		Base b = og.get();
	}
}
